package com.juzi.polymorphic.test;

/**
 * 实现类
 */
public class KeyBoard  implements USB{
    private String name;

    public KeyBoard(String name) {
        this.name = name;
    }

    @Override
    public void connect() {
        System.out.println(name + "成功连接了电脑");
    }

    /**
     * 独有功能
     */
    public void kryDown(){
        System.out.println(name + "敲击出：傻逼太多，狗在叫");
    }

    @Override
    public void unconnect() {
        System.out.println(name + "从电脑中拔出");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
